<?php

namespace app\h5api\validate;

use think\Validate;

class Login extends Validate
{
	protected $scene = [
        'Authlogin' => ['code','from_uid'],
		'Phonelogin' => ['code','phone','vcode','from_uid'],
	];

	protected $rule =   [
        'code'  => 'require',
		'phone' => 'require|mobile',
		'vcode' => 'require',
        'from_uid' => 'number',
        'encryptedData' => 'require',
        'iv' => 'require',
	];

	protected $message  =   [
		'code.require'     => '404',
		'phone.require'     => '请填写手机号码',
		'vcode.require'     => '请输入验证码',
        'from_uid.number' => '必须为整数',
        'encryptedData.require'     => '缺少关键参数encryptedData',
        'iv.require'     => '缺少关键参数iv',
	];
}
